<template>
        <div style="width: 100%;height: 90%;" ref="yuan">
1111
        </div>
</template>
    
<script setup lang='ts'>
import echart from './echart.vue';
import {ref,onMounted} from 'vue'
import { gettong } from '../request/api';
import * as echarts from 'echarts'
let yuan=ref()

let option=ref({
  legend: {
    right: 'right'
  },
 
  series: [
    {
      name: 'Nightingale Chart',
      type: 'pie',
      radius: [0, 150],
      center: ['50%', '50%'],
      roseType: 'area',
      itemStyle: {
        borderRadius: 1
      },
      data: [
        { value: 40, name: 'rose 1' },
        { value: 38, name: 'rose 2' },
        { value: 82, name: 'rose 3' },
        
      ]
    }
  ]
})

onMounted(()=>{
    gettong().then(res=>{
        console.log(res)
        option.value.series[0].data=res.data.data
    })
})
</script>
    
<style>
    
</style>